﻿package plugin.chatflash
{
    import cmd.*;
    import com.sh.game.global.*;
    import com.sh.game.util.*;
    import flash.filters.*;
    import flash.text.*;
    import plugin.chatflash.component.*;
    import uiresource.*;

    public class GameChatUI extends ChatUI
    {
        public var mMenu:ChatMenu;
        protected var mChannelList:ChannelListPanel;
        public var mPCComponent:PrivateChatPanel;
        public var mBuglePanel:BugleChatPanel;
        protected const DEFAULT_TEXT:String = "请输入聊天内容，按回车键发送";
        protected const STALLAGE_DEFAULT_TEXT:String = "请在摆摊界面发布展示消息";
        protected const PRIVATE_DEFAULT_TEXT:String = "请输入聊天内容，按回车键发送";
        public var mFilter:DropShadowFilter;
        protected var mTextFormat:TextFormat;

        public function GameChatUI()
        {
            this.mFilter = new DropShadowFilter(0, 0, 0, 0.8, 2, 2, 10, 1);
            this.mTextFormat = new TextFormat("Arial", 12, UIGlobel.chanel2color(ChatCMD.ChannelWorld));
            mouseEnabled = true;
            mouseChildren = true;
            this.createChildren2();
            return;
        }// end function

        private function createChildren2() : void
        {
            mInputPanel.mouseEnabled = false;
            mInputPanel.mouseChildren = false;
            mBG.mouseChildren = false;
            mBG.mouseEnabled = false;
            this.mPCComponent = new PrivateChatPanel();
            this.mPCComponent.x = 45;
            this.mPCComponent.y = 160;
            this.mPCComponent.visible = false;
            mPanel.addChild(this.mPCComponent);
            this.mBuglePanel = new BugleChatPanel();
            this.mBuglePanel.y = -36;
            mPanel.addChild(this.mBuglePanel);
            this.mChannelList = new ChannelListPanel();
            this.mChannelList.x = 1;
            this.mChannelList.y = 63;
            this.mChannelList.hide();
            addChild(this.mChannelList);
            this.mMenu = new ChatMenu();
            this.mMenu.hide();
            GlobalLayer.instance.root.addChild(this.mMenu);
            return;
        }// end function

    }
}
